package com.asit.demo.controller;

import com.asit.demo.mapper.SysLogMapper;
import com.asit.demo.model.SysLog;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/log")
@Slf4j
public class SysLogController {
    @Resource
    private SysLogMapper sysLogMapper;
    /**
     * 根据ID查找
     * @param id
     * @return
     */
    @GetMapping("/get/{id}")
    public SysLog getLogById(@PathVariable String id) {
        SysLog syslog = sysLogMapper.selectById(id);
        return syslog;
    }
}
